Derivatives problem 12.mws

1. Exponential functions.

If you wish to define an exponential function with base a other than the natural base exp(1) , then you can define the function in the usual manner. For example, if the base is 2, then

> g:=x->2^x;

g := proc (x) options operator, arrow; 2^x end proc...

defines the function, and you can evaluate and differentiate the function f without trouble. However, Maple does not recognize the letter e as the constant exp(1) , so to define the natural exponential function, we do as follows.

> f:=x->exp(x);

f := exp

What this means is that the exponential function is a built in function for Maple, like the trigonometric functions. When we evaluate this function at the value x , Maple prints the answer in the usual notation that we are familiar with.

> f(x);

exp(x)

Let us check whether Maple knows how to differentiate the two exponential functions defined above.

> D(f)(x);D(g)(x);

exp(x)

2^x*ln(2)

Let us see if Maple can find the limit of the difference quotient for calculating the derivative of the exponential function at x .

> limit((f(x+h)-f(x))/h,h=0);

exp(x)

Similarly, we can find the limit of the difference quotient for bases other than the natural base exp(1) .

> limit((g(x+h)-g(x))/h,h=0);

2^x*ln(2)

Now let us address the question of how to differentiate functions that arise by composing the exponential function with other functions. Remember how the chain rule was stated in a previous lab:

D(`@`(f,g))(x) = D(f)(g(x))*D(g)(x) .

Let us keep the exponential function f defined above, but define the function g(x) = tan(x) .

> g:=x->tan(x);

g := tan

Let us check that the function y = exp(tan(x)) really is given by the composition of f and g .

> (f@g)(x);

exp(tan(x))

Let u=u(x), then by virtue of the chain rule we have d/dx e^u = e^u*du/dx .

Now let us verify this formula for our function y = exp(tan(x)) , by computing its derivative in two ways, like we did on the chain rule problems.

> D(f@g)(x);D(f)(g(x));D(g)(x);D(f)(g(x))*D(g)(x);

exp(tan(x))*(1+tan(x)^2)

exp(tan(x))

1+tan(x)^2

exp(tan(x))*(1+tan(x)^2)

Notice that in our formula, exp(u) corresponds to exp(tan(x)) , while du/dx corresponds to 1+tan(x)^2 .

Submission:

Under certain circumstances a rumor spreads according to the equation p(t) = 1/(1+a*e^(-k*t)) where p(t) is the proportion of the population that knows the rumor at time t and a and k are positive constants.

(a) Find limit(p(t),t = infinity) .

(b) Find the rate of spread of the rumor.

(c) Graph p when a=10, k=0.5 with t measured in hours. Use the graph to estimate how long it will take for 80% of the population to hear the rumor.

In order to get Maple to find an answer to the limit, you will have to tell it to make some assumptions about the values of the parameters a and k . The following command tells Maple to assume that k is positive.

> assume(k,positive);

Make sure to include a nice graph for part c) which allows the reader to easily verify the estimate that you give.

Submission worksheet:

 

2. Orthogonal families of curves.

We already know that the tangent line to a curve y = f(x) at a point ( a, f(a) ) is given by the equation y = D(f)(a)*(x-a)+f(a) . What about the equation of the line which is perpendicular, or normal to the curve at that point. It has slope which is given by the negative reciprocal of the slope of the tangent line to the curve, so its equation is y = (-1/D(f)(a))*(x-a)+f(a) . Let us consider an example. Suppose that

> f:=x->exp(tan(x)); a:=Pi/4;

f := proc (x) options operator, arrow; exp(tan(x)) ...

a := 1/4*Pi

Let us define the tangent and normal lines to the curve, and plot them along with the curve to illustrate that they are perpendicular to each other.

> T:=x->D(f)(a)*(x-a)+f(a);

T := proc (x) options operator, arrow; D(f)(a)*(x-a...

> N:=x->(-1/D(f)(a))*(x-a)+f(a);

N := proc (x) options operator, arrow; -1/D(f)(a)*(...

> plot([f,T,N],0..Pi/3,y=1..4,color=[red,blue,green],scaling=constrained);

[Maple Plot]

Note that it is very important to choose scaling=constrained; otherwise the lines will not appear to be perpendicular to each other.

Let us consider a sequence of curves of the form y = ln(x)+c , for some values of c, and another sequence of curves of the form y = -x^2/2+k , for some values of k . To see that any two such curves intersect at a right angle, show that the derivatives of each of these curves are negative reciprocals of each other at any value of x , so that their tangent lines are perpendicular at any point where the curves intersect. Let us plot some of these curves for various values of the constants.

> fnc1:=seq(ln(x)+c,c=-3..3);

fnc1 := ln(x)-3, ln(x)-2, ln(x)-1, ln(x), ln(x)+1, ...

> fnc2:=seq(-x^2/2+k,k=-3..3);

fnc2 := -1/2*x^2-3, -1/2*x^2-2, -1/2*x^2-1, -1/2*x^...

> plot([fnc1,fnc2],x=-1..3,y=-1..3,scaling=constrained);

[Maple Plot]

From the plot, it does appear that the curves intersect perpendicularly.

Submission:

For the families of curves y = exp(x)+k , and y = exp(-x)+c , show that they intersect perpendicularly at every point of intersection, and then plot several curves of each type in order to illustrate that this is true.

Submission worksheet: